Class yassl.parser
All Packages    This Package    Previous    Next

Class yassl.parser

java.lang.Object
   |
   +----yassl.parser

public class parser
extends Object
implements lexemes
This is a simple recursive descent parser, with operator precedence implemented using the trick stolen from javac which reorders the parse tree

Constructor Index

 o parser()
 o parser(Applet)

Method Index

 o lambda()
process a lambda declaration.
 o main(String[])
 o match(int)
This checks that the input token matches the expected token.
 o parse(InputStream)
This is the toplevel parsing cycle.
 o stmt()
An individual statement.
 o term()

Constructors

 o parser
  public parser()
 o parser
  public parser(Applet c)

Methods

 o parse
  public pnode parse(InputStream in) throws IOException, parserError, yasslError
This is the toplevel parsing cycle.

 o lambda

  public pnode lambda() throws IOException, parserError
process a lambda declaration. <(> [ [, ]] <)> <{> stmtlist; <}>

 o stmt

  public pnode stmt() throws IOException, parserError
An individual statement. Statements are things that arent method or field declarations.
stmt
  -> <{> (stmt)* <}>
  -> expr <;>
  ->  <(> expr <)> stmt
  ->  <(> expr <)> stmt  stmt
  ->  <(> expr <)> stmt
  ->  <(> expr <;> expr <;> expr <)> stmt

 o term

  public pnode term() throws IOException, parserError
 o match
  public void match(int val) throws IOException, parserError
This checks that the input token matches the expected token. It also advances the token to the next one.

 o main

  public static void main(String argv[]) throws IOException, parserError, yasslError

All Packages    This Package    Previous    Next